package org.nokatag.dbgrid;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 数据基础类
 * @author rebin
 */
public class NDBGridDataItem implements Serializable{

	private static final long serialVersionUID = -5796840314368357066L;
	private Long  pages=0L;//总页数
	private Long  nowpage=0L;//当前第几页
	private Long  startrow=0L;//当前页起始行
	private Long  endrow=0L;//当前页结束行
	private Long  pagesize=0L;//页大小
	private Long  lastRow=0L;//总记录数
	private List<String> cellName =null;//列名
	private List<Map<String,String>> rows = new ArrayList<Map<String,String>>();//数据记录集
	private Map<String,String> sumCells= null;//汇总列
	
	public NDBGridDataItem( Long  pages,Long  nowpage,Long  startrow,Long  endrow,Long  pagesize,Long lastRow,List<String> cellName){
		this.pages=pages;
		this.nowpage=nowpage;
		this.startrow=startrow;
		this.endrow=endrow;
		this.pagesize=pagesize;
		this.lastRow=lastRow;
		this.cellName=cellName;
	}
	
	public NDBGridDataItem( Long  pages,Long  nowpage,Long  startrow,Long  endrow,Long  pagesize,Long lastRow,List<Map<String,String>> rows,List<String> cellName){
		this.pages=pages;
		this.nowpage=nowpage;
		this.startrow=startrow;
		this.endrow=endrow;
		this.pagesize=pagesize;
		this.lastRow=lastRow;
		this.rows=rows;
		this.cellName=cellName;
	}
	

	public Long getPages() {
		return pages;
	}

	public void setPages(Long pages) {
		this.pages = pages;
	}

	public Long getNowpage() {
		return nowpage;
	}

	public void setNowpage(Long nowpage) {
		this.nowpage = nowpage;
	}

	public Long getStartrow() {
		return startrow;
	}

	public void setStartrow(Long startrow) {
		this.startrow = startrow;
	}

	public Long getEndrow() {
		return endrow;
	}

	public void setEndrow(Long endrow) {
		this.endrow = endrow;
	}

	public Long getPagesize() {
		return pagesize;
	}

	public void setPagesize(Long pagesize) {
		this.pagesize = pagesize;
	}

	public List<Map<String,String>> getRows() {
		return rows;
	}

	public void setRows(List<Map<String,String>> rows) {
		this.rows = rows;
	}

	public Long getLastRow() {
		return lastRow;
	}

	public void setLastRow(Long lastRow) {
		this.lastRow = lastRow;
	}

	public List<String> getCellName() {
		return cellName;
	}

	public void setCellName(List<String> cellName) {
		this.cellName = cellName;
	}

	public Map<String, String> getSumCells() {
		return sumCells;
	}

	public void setSumCells(Map<String, String> sumCells) {
		this.sumCells = sumCells;
	}
}
